package rs.pnv.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

import org.hibernate.validator.constraints.NotBlank;

@Entity
@Table(name = "PCC_BANKS")
@XmlAccessorType(XmlAccessType.FIELD)
public class BankPartner extends AbstractEntity {
	
	@NotBlank
	@Column(nullable = false, unique = true)
	@XmlElement(nillable = false)
	private String bankId;

	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String bankName;

	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String wsdlLocation;

	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String defaultNamespace;

	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String serviceNAme;
	
	@NotBlank
	@Column(nullable = false)
	@XmlElement(nillable = false)
	private String certificateLocation;

	public BankPartner() {

	}

	public String getBankId() {
		return bankId;
	}

	public void setBankId(String bankId) {
		this.bankId = bankId;
	}

	public String getCertificateLocation() {
		return certificateLocation;
	}

	public void setCertificateLocation(String certificateLocation) {
		this.certificateLocation = certificateLocation;
	}

	public void setBankIdNumber(String bankId) {
		this.bankId = bankId;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getWsdlLocation() {
		return wsdlLocation;
	}

	public void setWsdlLocation(String wsdlLocation) {
		this.wsdlLocation = wsdlLocation;
	}

	public String getDefaultNamespace() {
		return defaultNamespace;
	}

	public void setDefaultNamespace(String defaultNamespace) {
		this.defaultNamespace = defaultNamespace;
	}

	public String getServiceNAme() {
		return serviceNAme;
	}

	public void setServiceNAme(String serviceNAme) {
		this.serviceNAme = serviceNAme;
	}
	
	

/*

	@Override
	public int hashCode() {
		return new HashCodeBuilder()
				.append(username)
				.append(firstname)
				.append(lastname)
				.append(jmbg)
				.append(passportNumber)
				.append(address)
				.append(phoneNumber)
				.append(contractor)
				.append(email)
				.appendSuper(super.hashCode())
				.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (obj == this) {
			return true;
		}
		if (obj.getClass() != getClass()) {
			return false;
		}

		final User otherUser = (User) obj;

		return new EqualsBuilder()
				.append(username, otherUser.getUsername())
				.append(firstname, otherUser.getFirstname())
				.append(lastname, otherUser.getLastname())
				.append(jmbg, otherUser.getJmbg())
				.append(passportNumber, otherUser.getPassportNumber())
				.append(address, otherUser.getAddress())
				.append(phoneNumber, otherUser.getPhoneNumber())
				.append(contractor, otherUser.getContractor())
				.append(email, otherUser.getEmail())
				.appendSuper(super.equals(obj))
				.isEquals();
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("username", username)
				.append("firstname", firstname)
				.append("lastname", lastname)
				.append("jmbg", jmbg)
				.append("passportNumber", passportNumber)
				.append("address", address)
				.append("phoneNumber", phoneNumber)
				.append("contractor", contractor)
				.append("email", email)
				.append(super.toString())
				.toString();
	}
*/

}
